package com.central.apps.entity;

import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.annotation.Id;

/**
 * es文件
 *
 * @author JHY
 * @date 2022/11/10
 */
@Data
@Document(indexName = "tbfile", type = "tbfile", shards = 1, replicas = 0)
public class EsFile {
    /**
     * 索引库
     */
    public static final String INDEX = "tbfile";
    /**
     * 索引类型
     */
    public static final String INDEX_TYPE = "tbfile";

    @Id
    @Field(type = FieldType.Integer)
    private String fileid;
    @Field(type = FieldType.Text)
    private String pathid;
    @Field(type = FieldType.Text)
    private String deptid;
    @Field(type = FieldType.Text)
    private String deptfullname;
    @Field(type = FieldType.Text)
    private String userid;
    @Field(type = FieldType.Text)
    private String username;
    @Field(type = FieldType.Text)
    private String uploadtime;
    @Field(type = FieldType.Text)
    private String filesize;
    @Field(type = FieldType.Text)
    private String filepath;
    @Field(type = FieldType.Text)
    private String extensionname;
    @Field(type = FieldType.Text)
    private String appid;
    @Field(type = FieldType.Text)
    private String appname;
    @Field(type = FieldType.Text)
    private String recordid;
    @Field(type = FieldType.Text)
    private String filestatus;
    @Field(type = FieldType.Text)
    private String statustime;
    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String filename;
    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String filerealname;
    @Field(type = FieldType.Text)
    private String fileversion;
    @Field(type = FieldType.Text)
    private String md5;
    @Field(type = FieldType.Text)
    private String isshow;
    @Field(type = FieldType.Text)
    private String downloadurl;

    /**
     * 文件内容
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String filecontent;
}
